package com.jing.cloud.service.group.method;

import com.jing.cloud.service.group.bean.GroupMember;
import com.jing.cloud.service.group.helper.GroupHelper;
import com.jing.cloud.service.group.method.param.TsBean;
import com.jing.cloud.service.method.AbstractMethod;
import com.jing.cloud.service.method.Method;
import com.jing.cloud.service.util.db.Page;
import com.jing.cloud.service.Res;
import com.jing.cloud.util.RspUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by 29017 on 2017/9/20.
 */
@Component
public class GetGroupMembers extends AbstractMethod<TsBean> implements Method<TsBean> {
    @Autowired
    private GroupHelper groupHelper;

    @Override
    public Res call(TsBean tsBean) throws Exception {
        Page<GroupMember> page = groupHelper.getGroupMembers(tsBean.getId(), tsBean.getTs(), tsBean.getSize());
        return RspUtil.success(page);
    }
}
